package cn.cs.service;

import cn.cs.mapper.AgentUserForShopDBMapper;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class AgentUserForShopDBService {
    @Resource
    private AgentUserForShopDBMapper agentUserForShopDBMapper;
    @RequestMapping(value = "/getAgentShopByAgentId", method = RequestMethod.POST)
    Map<String,Object> getAgentShopByAgentId(@RequestParam("agent_id") String agent_id){
        return agentUserForShopDBMapper.getAgentShopByAgentId(agent_id);
    }

    @RequestMapping(value = "/insertAgentShop", method = RequestMethod.POST)
    int insertAgentShop(@RequestBody Map<String, Object> shopInfo){
        return agentUserForShopDBMapper.insertAgentShop(shopInfo);
    }
    @RequestMapping(value = "/getNearShopById", method = RequestMethod.POST)
    Map<String,Object> getNearShopById(@RequestParam("id") String id){
        return agentUserForShopDBMapper.getNearShopById(id);
    }
    @RequestMapping(value = "/getProTypeById", method = RequestMethod.POST)
    Map<String,Object> getProTypeById(@RequestParam("id") String id){
        return agentUserForShopDBMapper.getProTypeById(id);
    }
}
